package other;

import java.util.Random;

public class RandomDemo {
	public static void main(String[] args) {
		Random rand = new Random();
		//1.随机的整数
		boolean nextBoolean = rand.nextBoolean();
		System.out.println(nextBoolean);
		int nextInt = rand.nextInt();
		System.out.println(nextInt);
		// 生成0-9随机数
		int nextInt2 = rand.nextInt(10);
		System.out.println(nextInt2);
		
		// 33 - 77    rand.nextInt(max-min+1) + min;
		int nextInt3 =  rand.nextInt(45) + 33;
		System.out.println(nextInt3);
	}
}
